import com.mytest.pojo.Father;
import com.mytest.pojo.Mother;
import com.mytest.pojo.Student;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class Start {

    public static void main(String[] args) {

        ApplicationContext applicationContext = new ClassPathXmlApplicationContext("applicationContext.xml");
        /*Student student = (Student) applicationContext.getBean("student");
        System.out.println(student);*/
        Father father = (Father) applicationContext.getBean("ff");
        System.out.println(father);
        /*Mother mother = (Mother) applicationContext.getBean("ff");
        System.out.println(mother);*/

        Student student = (Student) applicationContext.getBean("student");
        System.out.println(student.getClass());
    }
}
